<?php
include_once('Smarty.class.php');
$main_smarty = new Smarty;

include('config.php');
include(mnminclude.'html1.php');
include(mnminclude.'link.php');
include(mnminclude.'tags.php');
include(mnminclude.'group.php');
include(mnminclude.'user.php');
include(mnminclude.'csrf.php');
include(mnminclude.'smartyvariables.php');

// sidebar
$main_smarty = do_sidebar($main_smarty);
if($_REQUEST["email_address_1"]){
echo " :;: ";
// pagename	
define('pagename', 'invitado'); 
$main_smarty->assign('pagename', pagename);
			$email_to =  $_REQUEST["email_address_1"];
			$Pmensaje = $_REQUEST["mensajeP"];
			$email_from =  $db->get_var("SELECT user_login FROM `" . table_users . "` WHERE `user_id` = '$current_user->user_id';");
			$email_subject = "Hola, " . $main_smarty->get_config_vars("PLIGG_Visual_Names") . "  te ha invitado a unirte a BisClick.";
			$email_message = "Hola," . $email_from . " \r\n\r\n te ha invitado a unirte a  " . $main_smarty->get_config_vars("PLIGG_Visual_Name"). "." .$Pmensaje.".<br /><br /><br /> En <a href='http://www.bisclick.com'>www.bisclick.com</a> podrás dar a conocer tu empresa, sus productos y servicios, conocer sobre otras empresas y/o negocios, recomendar y ser recomendado, buscar oportunidades de negocios, sugerir contactos, mantenerte informado y muchas otras posibilidades." . " <br />  <br />  <br /> 
Regístrate Gratis!  \r\n";
			$email_headers = "From: " . Send_From_Email . "\r\nReply-To: " . Send_From_Email . "\r\nContent-Type: text/html; charset=UTF-8";
                        @mail($email_to, $email_subject, $email_message, $email_headers);
			
			// show 'message sent', click to continue or wait 5..4..3..2..1.. then redirect
			header('Location: ' . $return);
			$main_smarty->assign('tpl_center', $the_template . '/invitar_center');
$main_smarty->display($the_template . '/pligg.tpl');
}else{
define('pagename', 'invitar'); 
$main_smarty->assign('tpl_center', $the_template . '/invitar_center');
$main_smarty->display($the_template . '/pligg.tpl');

}

// show the template


?>